Optimal. Leaf size=98 \[ \frac {2 a^{3/2} (c-d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{3/2} \sqrt {c+d} f}-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a+a \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2842, 21, 2852,
214} \begin {gather*} \frac {2 a^{3/2} (c-d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a \sin (e+f x)+a}}\right )}{d^{3/2} f \sqrt {c+d}}-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a \sin (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 214
Rule 2842
Rule 2852
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^{3/2}}{c+d \sin (e+f x)} \, dx &=-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a+a \sin (e+f x)}}+\frac {2 \int \frac {-\frac {1}{2} a^2 (c-d)-\frac {1}{2} a^2 (c-d) \sin (e+f x)}{\sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))} \, dx}{d}\\ &=-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a+a \sin (e+f x)}}-\frac {(a (c-d)) \int \frac {\sqrt {a+a \sin (e+f x)}}{c+d \sin (e+f x)} \, dx}{d}\\ &=-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a+a \sin (e+f x)}}+\frac {\left (2 a^2 (c-d)\right ) \text {Subst}\left (\int \frac {1}{a c+a d-d x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{d f}\\ &=\frac {2 a^{3/2} (c-d) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \cos (e+f x)}{\sqrt {c+d} \sqrt {a+a \sin (e+f x)}}\right )}{d^{3/2} \sqrt {c+d} f}-\frac {2 a^2 \cos (e+f x)}{d f \sqrt {a+a \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(233\) vs. \(2(98)=196\).
time = 1.64, size = 233, normalized size = 2.38 \begin {gather*} \frac {\left (-2 \sqrt {d} \sqrt {c+d} \cos \left (\frac {1}{2} (e+f x)\right )+(c-d) \left (\log \left (-\sec ^2\left (\frac {1}{4} (e+f x)\right ) \left (c+d+\sqrt {d} \sqrt {c+d} \cos \left (\frac {1}{2} (e+f x)\right )-\sqrt {d} \sqrt {c+d} \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )-\log \left ((c+d) \sec ^2\left (\frac {1}{4} (e+f x)\right )+\sqrt {d} \sqrt {c+d} \left (-1+2 \tan \left (\frac {1}{4} (e+f x)\right )+\tan ^2\left (\frac {1}{4} (e+f x)\right )\right )\right )\right )+2 \sqrt {d} \sqrt {c+d} \sin \left (\frac {1}{2} (e+f x)\right )\right ) (a (1+\sin (e+f x)))^{3/2}}{d^{3/2} \sqrt {c+d} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 4.38, size = 137, normalized size = 1.40
method | result | size |
default | \(-\frac {2 a \left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (-\arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, d}{\sqrt {a \left (c +d \right ) d}}\right ) a c +a \arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, d}{\sqrt {a \left (c +d \right ) d}}\right ) d +\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \sqrt {a \left (c +d \right ) d}\right )}{d \sqrt {a \left (c +d \right ) d}\, \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(137\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 177 vs.
\(2 (86) = 172\).
time = 0.44, size = 685, normalized size = 6.99 \begin {gather*} \left [-\frac {{\left (a c - a d + {\left (a c - a d\right )} \cos \left (f x + e\right ) + {\left (a c - a d\right )} \sin \left (f x + e\right )\right )} \sqrt {\frac {a}{c d + d^{2}}} \log \left (\frac {a d^{2} \cos \left (f x + e\right )^{3} - a c^{2} - 2 \, a c d - a d^{2} - {\left (6 \, a c d + 7 \, a d^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} - {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (c^{2} d + 3 \, c d^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right ) - {\left (c^{2} d + 4 \, c d^{2} + 3 \, d^{3} + {\left (c d^{2} + d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {\frac {a}{c d + d^{2}}} - {\left (a c^{2} + 8 \, a c d + 9 \, a d^{2}\right )} \cos \left (f x + e\right ) + {\left (a d^{2} \cos \left (f x + e\right )^{2} - a c^{2} - 2 \, a c d - a d^{2} + 2 \, {\left (3 \, a c d + 4 \, a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{d^{2} \cos \left (f x + e\right )^{3} + {\left (2 \, c d + d^{2}\right )} \cos \left (f x + e\right )^{2} - c^{2} - 2 \, c d - d^{2} - {\left (c^{2} + d^{2}\right )} \cos \left (f x + e\right ) + {\left (d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \cos \left (f x + e\right ) - c^{2} - 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )}\right ) + 4 \, {\left (a \cos \left (f x + e\right ) - a \sin \left (f x + e\right ) + a\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{2 \, {\left (d f \cos \left (f x + e\right ) + d f \sin \left (f x + e\right ) + d f\right )}}, \frac {{\left (a c - a d + {\left (a c - a d\right )} \cos \left (f x + e\right ) + {\left (a c - a d\right )} \sin \left (f x + e\right )\right )} \sqrt {-\frac {a}{c d + d^{2}}} \arctan \left (\frac {\sqrt {a \sin \left (f x + e\right ) + a} {\left (d \sin \left (f x + e\right ) - c - 2 \, d\right )} \sqrt {-\frac {a}{c d + d^{2}}}}{2 \, a \cos \left (f x + e\right )}\right ) - 2 \, {\left (a \cos \left (f x + e\right ) - a \sin \left (f x + e\right ) + a\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{d f \cos \left (f x + e\right ) + d f \sin \left (f x + e\right ) + d f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 130, normalized size = 1.33 \begin {gather*} \frac {\sqrt {2} {\left (\frac {2 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{d} + \frac {\sqrt {2} {\left (a c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - a d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \arctan \left (\frac {\sqrt {2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c d - d^{2}}}\right )}{\sqrt {-c d - d^{2}} d}\right )} \sqrt {a}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}}{c+d\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________